<el-dialog width="60%" top="100" :title="titleMap[dialogStatus]" :visible.sync="editVisible" :before-close="handleClose">
    <el-form ref="modelForm" :model="modelForm" label-width="70px" style="width:83%; margin-left:50px;">
        <input type="hidden" name="id" v-model="modelForm.id">
        <el-form-item label="分类" prop="modelId">
            <el-select v-model="modelForm.modelId" placeholder="请选择分类">
                <el-option label="首页顶部" :value="1"></el-option>
                <el-option label="首页中部" :value="2"></el-option>
                <el-option label="首页底部" :value="3"></el-option>
                <el-option label="博客顶部" :value="4"></el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="标题" prop="title">
            <el-input v-model="modelForm.title" />
        </el-form-item>
        <el-form-item label="链接" prop="link">
            <el-input v-model="modelForm.link" />
        </el-form-item>
        <el-form-item label="图片" prop="smallimg">
            <template v-if="modelForm.smallimg">
                <img class="app-blog-form-img" width="60%" :src="modelForm.smallimg" alt="" />
                <div class="app-form-preview">
                    {#<el-button size="small" block type="danger" plain icon="el-icon-delete" @click="handleDelImg">删除</el-button>#}
                </div>
            </template>
            <template v-else>
                <el-upload ref="upload" action="/admin/upload/image" list-type="picture-card" :multiple="false" :on-success="handleUploadSuccess" :on-preview="handleImgPreview" :on-remove="handleRemove">
                    <i class="el-icon-plus"></i>
                </el-upload>
                <el-dialog :visible.sync="dialogVisible" :append-to-body="true">
                    <img width="100%" :src="dialogImageUrl" alt="" />
                </el-dialog>
            </template>
        </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
        <el-button @click="handleCancel">取消</el-button>
        <el-button type="primary" @click="dialogStatus === 'create' ? createData() : updateData() ">确认</el-button>
    </div>
</el-dialog>
